ScxV6Object.GetSecurity Method

Returns the security of a database object.

Remarks

The GetSecurity method returns the object's security as a string.

The string comprises the security settings of all users configured on the object, delimited by commas.

You must have Security access to the object to retrieve its security information.

The format of the string is:

<User Type>[:<Name>]:<ACL string>[,...]

The valid user types are:

Name Description
User A User Account. The 'User' type is followed by the name of the User Account.
Group A User Group, of which zero or more user accounts might be a member. The 'Group' type is followed by the name of the User Group.
Guest The Guest user account (which does not require a logon). (By default on new installations, this built-in user account has no access permissions.)
Web The guest user for web connections made via a web interface such as Original WebX. (Virtual ViewX does not use this user account - instead, users must log on to Virtual ViewX via a valid configured User Account.)
Everyone

The built-in 'Everyone' User Group. If this User Group is enabled, all User Accounts inherit the security permissions that are assigned to this User Group.

NOTICE

Security threat

On systems on which the 'Everyone' User Group is enabled, all User Accounts on the system automatically inherit the security permissions that are assigned to the 'Everyone' User Group, including the Guest user (which does not require a logon). Each user's security permissions comprise: Everyone permissions + User Group permissions + User Account permissions. To help avoid providing all users with unintended access to features and functionality that should be restricted, use configured User Groups rather than the 'Everyone' User Group. If the 'Everyone' User Group has to be used, it MUST be assigned the minimum permissions required, with access restricted where possible to just the relevant parts of the database. (On new installations, the built-in 'Everyone' User Group is inactive and is not assigned any security permissions by default.)
Failure to follow these instructions can result in equipment damage and a breach in system security.

The ACL string is a list of the types of access that the User Account or User Group has on the object. It is a privilege group name followed by "+" and a list of two or three-letter identifiers separated by spaces.

The valid ACL identifiers are:

Identifier Description
RD Read
BRS Browse
CTL Control
OVR Override
ALM Accept Alarms
VWA View Alarms
RMA Remove Alarms
RDR Manual Redirection
UNA Unaccept Alarms
NOT Edit Notes
RET Retrieve Data
PRM Promote
TUN Tune Limits
AHS Annotate History
MHS Modify History
VHS Validate History
DIS Disable Points
DLM Disable Alarms
DCT Disable Controls
SWL Switch Line
DIA Diagnostic
EXC Exclusive Control
MEC Manage Exclusive Control
CFG Configure
SEC Security
ADM System Administration

In addition to these, a number of these are combined into privilege groups, representing common roles of system users.

Name Privileges
None No access
View RD
Operator RD BRS CTL OVR ALM VWA RMA RDR NOT RET PRM TUN AHS
Advanced RD BRS CTL OVR DIS ALM UNA VWA RMA RDR NOT RET PRM TUN AHS MHS VHS DLM DCT SWL DIA EXC MEC
Configuration RD BRS CTL OVR DIS ALM VWA RMA NOT RET PRM TUN AHS MHS VHS DLM DCT SWL DIA EXC MEC CFG
Full Every privilege
Example:

The following example written in VB.NET retrieves the security information of a point in the database.

Dim Svr As ScxV6DbClient.ScxV6Server

' Connect to the server

Svr = New ScxV6DbClient.ScxV6Server

Svr.Connect("MAIN", "D", "")

Dim Obj As ScxV6DbClient.ScxV6Object

Obj = Svr.FindObject("Group.Test Point")

Console.WriteLine("The object has the following security: {0}", Obj.GetSecurity())

' Disconnect

Svr.Disconnect(

This produces the following output:

The object has the following security: The object has the following security: Everyone:View + BRS,User:Group.Export:View + NOT,User:Group.Operator:Operator + UNA VHS,User:D:Full,Group:Group.Special Users Group:View + BRS SEC ADM


Disclaimer

Geo SCADA Expert 2020